#!/home/zhangjl/.modular/pkg/packages.modular.com_mojo/bin/mojo run
# error: Unable to locate a suitable libpython 运行时 Mojo 可执行文件
# https://github.com/modularml/mojo/issues/551

from python import Python
from app import run, MyPair, HeapArray, UniquePointer  # 使用编译后的模块




fn _init():
    try:
        # this doesn't compile outside of a try block.
        # usage of try-except blocks should be documented in the Mojo doc
        # as their usage is enforced by the compiler
        Python.add_to_path(".")
        Python.add_to_path("./shared")
    except:
        pass


fn main():
    _init()
    # run_m()
    run()




fn run_m():
    # let mine = MyPair(200, 400)
    # mine.dump()
    print("---------- run mojo start ----------")
    let a = HeapArray(4, 2)
    let b = a
    a.dump()
    b.dump()
    print("---------- run mojo end ------------")
